Skip to content

Comments

[SCRUM-241] 국문관광정보 API 동기화 구현 (#104)#134

Merged
ssggii merged 7 commits intomainfrom
SCRUM-241-국문관광정보-API-동기화-구현
Sep 16, 2025

Hidden character warning

The head ref may contain hidden characters: "SCRUM-241-\uad6d\ubb38\uad00\uad11\uc815\ubcf4-API-\ub3d9\uae30\ud654-\uad6c\ud604"
Merged

[SCRUM-241] 국문관광정보 API 동기화 구현 (#104)#134
ssggii merged 7 commits intomainfrom
SCRUM-241-국문관광정보-API-동기화-구현

Conversation

@moonxxpower
Copy link
Member

✏️ 연관 이슈

#104

⛳ 작업 내용

  • 장소 정보 동기화 API 구현 (매일) ([POST] /sync-spots/date?date={YYYYMMDD})
  • 위치에 따른 장소 동기화 API 구현 (주 1회) ([POST] /sync-spots/location)
  • 스케줄러 등록
    • 위치 정보 동기화: 매주 월요일 새벽 2시
    • 장소 정보 동기화: 매일 새벽 5시 30분

💬리뷰 요구사항

  • 등록한 스케줄 시간이 적절한지 검토 부탁드립니다!

📍 참고사항

  • 장소 정보 동기화의 경우, 관광공사 측에서 제공하는 관광정보 동기화 목록 조회 API를 사용했습니다. 해당 API는 매일 업데이트된 장소 정보들을 응답하며, 그 중 externalId와 데이터의 표출, 비표출을 의미하는 showflag만을 사용했습니다.
  • 해당 API가 업데이트된 장소가 없을 경우 빈 문자열을 응답하므로, JSON 파싱 오류를 방지하기 위해 ACCEPT_EMPTY_STRING_AS_NULL_OBJECT 설정을 추가했습니다.
  • [SCRUM-262] 즐길거리 상태별 응답 추가 (#128) #129 구현에 따라 동기화 부분도 상태 부분을 추가해야 할 것 같습니다! 해당 pr merge 후 추가하겠습니다 😢

 WebClient를 활용해 [국문 관광정보] 관광정보 동기화 목록 조회 API를 호출하고, 응답을 DTO로 파싱하는 코드를 구현했습니다.
[국문 관광정보] 관광정보 동기화 목록 조회 API를 통해 기존에 DB에 저장된 장소 중 업데이트된 장소를 감지하고 다시 공통정보 조회 API를 호출해 장소 정보를 동기화하는 기능을 구현했습니다. 만약 showflag가 0일 경우, 해당 장소를 삭제합니다.
기존 DB에 저장된 모든 코스를 조건에 따라 [국문 관광정보] 위치기반 관광정보 조회 API를 호출해 업데이트된 장소를 감지하고, 공통정보 조회 API를 다시 호출해 장소 정보를 동기화하는 기능을 구현했습니다.
위치 정보 동기화는 매주 월요일 새벽 2시에, 장소 정보 동기화는 매일 새벽 5시 30분에 실행되도록 스케줄러를 등록했습니다.
@moonxxpower moonxxpower self-assigned this Sep 8, 2025
@moonxxpower moonxxpower requested a review from ssggii September 8, 2025 20:27
@ssggii ssggii added this to the #7-sprint milestone Sep 10, 2025
@ssggii ssggii moved this to In Progress in Runchuck-러닝한다이 Sep 10, 2025
Copy link
Contributor

@ssggii ssggii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!!🥹 코멘트 드린 부분만 확인 한번 부탁드려요

@ssggii ssggii closed this Sep 15, 2025
@ssggii ssggii deleted the SCRUM-241-국문관광정보-API-동기화-구현 branch September 15, 2025 11:12
@github-project-automation github-project-automation bot moved this from In Progress to Done in Runchuck-러닝한다이 Sep 15, 2025
@ssggii ssggii restored the SCRUM-241-국문관광정보-API-동기화-구현 branch September 15, 2025 11:12
@ssggii ssggii reopened this Sep 15, 2025
@InKyungWoo InKyungWoo modified the milestones: #7-sprint, #8-sprint Sep 15, 2025
즐길거리 위치 정보 동기화 API에서 해당 코스와 연결된 모든 장소 연관관계를 모두 삭제하고 새로 생성하여 기존의 연관관계 정보가 유실되는 문제가 있었습니다. 따라서 전체 코스를 기준으로 DB와 위치기반 관광정보 조회 API 데이터를 비교하여 추가할 Spot과 삭제할 Spot을 선별하여 처리하도록 개선했습니다.
기존 새벽 2시에 설정한 즐길거리 위치 정보 동기화 작업의 실행 시간을 트래픽이 더 적은 새벽 4시로 변경했습니다.
@ssggii ssggii moved this from Done to In Progress in Runchuck-러닝한다이 Sep 16, 2025
@ssggii ssggii changed the base branch from develop to main September 16, 2025 14:42
@ssggii ssggii merged commit f584707 into main Sep 16, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Runchuck-러닝한다이 Sep 16, 2025
@moonxxpower moonxxpower deleted the SCRUM-241-국문관광정보-API-동기화-구현 branch September 17, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants